﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ExperimentUpon.VO;

namespace ExperimentUpon.Service
{
    public interface IExperimentService
    {
        /// <summary>
        /// 查看实验题目
        /// </summary>
        /// <param name="userId">当前登录用户的id</param>
        /// <returns>一组实验题目</returns>
        List<ExperimentSubject> viewExperimentSubjects(int userId);

        /// <summary>
        /// 发布一个实验题目
        /// </summary>
        /// <param name="userId">发布的用户id</param>
        /// <param name="gradeId">发布对应届别id</param>
        /// <param name="specialityId">发布对应专业id</param>
        /// <param name="subject">发布的实验内容</param>
        void publishExperimentSubject( int userId, 
                                              int gradeId, 
                                              int specialityId, 
                                              ExperimentSubject subject );

        /// <summary>
        /// 提交实验
        /// </summary>
        /// <param name="userId">当前登录用户的id</param>
        /// <param name="subjectId">题目id</param>
        /// <param name="answer">提交的答案内容</param>
        void submitAnswer(int userId, int subjectId, ExperimentAnswer answer);

        /// <summary>
        /// 批改实验答案
        /// </summary>
        /// <param name="userId">当前登录用户的id</param>
        /// <param name="answerId">答案id</param>
        /// <param name="record">批改成绩内容</param>
        void remarkExperimentAnswer(int userId, int answerId, ExperimentRecord record);

        /// <summary>
        /// 查看实验成绩，通过题目的id
        /// 用于老师查看一个题目所有同学的提交的答案
        /// </summary>
        /// <param name="subjectId"></param>
        /// <returns></returns>
        List<ExperimentRecord> viewExperimentRecordBySubjectId(int subjectId);

        /// <summary>
        /// 查看实验成绩，通过提交的答案
        /// 用于学生查看自己提交的答案的成绩
        /// 也用于老师查看某个学生某个题目的答案
        /// </summary>
        /// <param name="answerId"></param>
        /// <returns></returns>
        ExperimentRecord viewExperimentRecordByAnswerId(int answerId);
    }
}
